package com.sandwormz.webcompiler;

/**
 * An uncaught exception wrapper. This is usually used as a wrapper for
 * exceptions that may be thrown, but can not be handled within the context of
 * the compiler.
 * 
 * Created: Dec 19, 2012 10:43:43 AM
 * 
 * @author mbryant
 * 
 */
@SuppressWarnings("serial")
public class PageCompilerError extends RuntimeException {

    private int line = -1;

    /**
     * @param line2
     * @param string
     * @param e
     */
    public PageCompilerError(final int line, final String msg, final Throwable e) {
        super(msg, e);
        this.setLine(line);

    }

    /**
     * @param findLineAtIndex
     * @param e
     */
    public PageCompilerError(final int line, final Throwable e) {
        this.line = line;
    }

    /**
     * @param string
     */
    public PageCompilerError(final String msg) {
        super(msg);
    }

    public PageCompilerError(final String msg, final Throwable e) {
        super(msg, e);
    }

    /**
     * @param e
     */
    public PageCompilerError(final Throwable e) {
        super(e);
    }

    /**
     * @return the line
     */
    public int getLine() {
        return this.line;
    }

    /**
     * @param line
     *            the line to set
     */
    public void setLine(final int line) {
        this.line = line;
    }
}
